package cn.tedu.m1;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 生产者可直接发送一个消息
 */
@Component
public class Prodicer {
    @Autowired
    private AmqpTemplate at;

    public void send(){
        at.convertAndSend("helloword", "hello");
    }
}
